import Mock from 'mockjs';

Mock.mock(RegExp('/museum-role/super/role/getAllRole' + '.*'), 'post', {
  code: 200,
  message: '获取角色列表',
  data: {
    total: 6,
    roles: [
      {
        roleId: 1,
        roleName: '大同市管理员',
        roleDesc: '省级管理员',
        permissionIds: ['999'],
        createTime: '2020-12-08 21:25:45',
        updateTime: '2020-12-28 21:32:14',
        areaName: '晋中市部门'
      },
      {
        roleId: 2,
        roleName: '人员一',
        roleDesc: '市级管理员',
        permissionIds: [
          '999',
          '1',
          '2',
          '3',
          '4',
          '5',
          '6',
          '8',
          '9',
          '12',
          '13',
          '14',
          '15'
        ],
        createTime: '2020-12-08 21:25:54',
        updateTime: '2020-12-28 21:32:29',
        areaName: '晋中市部门'
      },
      {
        roleId: 204,
        roleName: '人员二',
        roleDesc: '7778',
        permissionIds: ['999', '1', '2', '3', '4', '5'],
        createTime: '2020-12-28 11:55:53',
        updateTime: '2020-12-28 21:32:43',
        areaName: '晋中市部门'
      },
      {
        roleId: 207,
        roleName: 'string',
        roleDesc: 'string',
        permissionIds: ['999', '1', '2'],
        createTime: '2021-01-04 13:50:46',
        updateTime: '2021-01-04 13:53:01',
        areaName: '晋中市部门'
      },
      {
        roleId: 208,
        roleName: '测试角色',
        roleDesc: 'test',
        permissionIds: ['999', '1'],
        createTime: '2021-01-04 13:54:48',
        updateTime: '2021-01-04 13:54:48',
        areaName: '晋中市部门'
      },
      {
        roleId: 209,
        roleName: '测试角色',
        roleDesc: 'test',
        permissionIds: ['999', '1'],
        createTime: '2021-01-04 13:56:59',
        updateTime: '2021-01-04 13:56:59',
        areaName: '晋中市部门'
      },
      {
        roleId: 200,
        roleName: '默认角色',
        roleDesc: '默认角色',
        permissionIds: [],
        createTime: '2020-12-08 21:29:37',
        updateTime: '2020-12-08 21:29:37',
        areaName: '晋中市部门'
      }
    ]
  }
});

Mock.mock('/museum-role/super/role/addRole', 'post', {
  code: 200,
  message: '添加角色成功',
  data: null
});

Mock.mock(RegExp('/museum-role/super/role/deleteRole' + '.*'), 'delete', {
  code: 200,
  message: '删除角色成功',
  data: null
});

Mock.mock('/museum-role/super/role/update', 'put', {
  code: 200,
  message: '修改角色成功',
  data: null
});
